 package uk.co.mmscomputing.util;
 
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FilterInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
 public class JarInputStream extends FilterInputStream
 {
   private static ClassLoader cl = JarInputStream.class.getClassLoader();
 
   public JarInputStream(String paramString) throws IOException {
     super(load(paramString));
   }
 
   private static InputStream load(String paramString)
     throws IOException
   {
     String str = System.getProperty("user.dir") + File.separator + paramString.replace('/', File.separatorChar);
     if (new File(str).exists()) return new FileInputStream(str);
 
     InputStream localInputStream = cl.getResourceAsStream(paramString);
     if (localInputStream == null) {
       throw new IOException("uk.co.mmscomputing.util.JarInputStream.load\n\tFile " + paramString + " does not exist");
     }
     return localInputStream;
   }
 }

